import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/order_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class OrderDetailEntity {
	late int code;
	late String msg;
	 OrderDetailData data = OrderDetailData();

	OrderDetailEntity();

	factory OrderDetailEntity.fromJson(Map<String, dynamic> json) => $OrderDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $OrderDetailEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class OrderDetailData {
	late int id;
	@JSONField(name: "channel_id")
	late int channelId;
	late String title;
	@JSONField(name: "sell_price")
	late String sellPrice;
	@JSONField(name: "tra_time")
	late String traTime;
	@JSONField(name: "update_time")
	late String updateTime;
	late int status;
	late String guid;
	@JSONField(name: "is_indulge")
	late int isIndulge;
	@JSONField(name: "is_msg")
	late int isMsg;
	@JSONField(name: "is_bystages")
	 String isBystages = '';
	@JSONField(name: "category_text")
	late String categoryText;
	@JSONField(name: "sell_userid")
	 String sellUserid = '';

	@JSONField(name: "sx_price")
	late String sxPrice;

	@JSONField(name: "img_url")
	late String imgUrl;
	@JSONField(name: "game_password")
	late String gamePassword;
	@JSONField(name: "reality_price")
	late String realityPrice;
	late String paycode;
	@JSONField(name: "game_account")
	late String gameAccount;

	OrderDetailData();

	factory OrderDetailData.fromJson(Map<String, dynamic> json) => $OrderDetailDataFromJson(json);

	Map<String, dynamic> toJson() => $OrderDetailDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}